<?php
$this->breadcrumbs=array(
	'Time Trackings',
);

$this->menu=array(
	array('label'=>'Create TimeTracking', 'url'=>array('create')),
	array('label'=>'Manage TimeTracking', 'url'=>array('admin')),
);
?>

<h1>Time Trackings</h1>

<p>Total:

<?php
//get total time data
$total = 0;
foreach($dataProvider->getData() as $data) {
	$start = new DateTime($data->start);
	$end = new DateTime($data->end);
	$total += ($end->getTimestamp() - $start->getTimestamp());
}
		echo ($total / 3600)." Stunden gearbeitet (".($total/3600 * 9)."€ verdient)";
?>
</p>

<?php $this->widget('zii.widgets.CListView', array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'_view',
)); ?>
